<?php

namespace App\Jobs;

use App\Models\Notice;
use Illuminate\Bus\Queueable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;

class OptimizePodcast implements ShouldQueue
{
    use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;

    /**
     * Create a new job instance.
     *
     * @return void
     */
    public function __construct()
    {
        //
    }

    /**
     * Execute the job.
     *
     * @return void
     */
    public function handle()
    {
        Notice::create([
            'title'=>88,
            'content'=>'OptimizePodcast',
            'is_popup'=>true
        ]);
        return true;
    }
    public function failed(\Exception $exception)
    {
        \Log::error('XXXXXXXXXXXXXXXXXXXX', ['error' => $exception->getMessage()]);

    }
}
